TOOL.Category			= "Mineral Mining";
TOOL.Name				= "Mining Devices";

TOOL.DeviceName			= "Mining Device"
TOOL.DeviceNamePlural	= "Mining Devices"
TOOL.ClassName			= "mining_device_tool"

TOOL.DevSelect			= true
TOOL.CCVar_type			= "asteroid_scanner"
TOOL.CCVar_sub_type		= "scanner"
TOOL.CCVar_model		= "models/cerus/modbridge/misc/accessories/acc_radar1.mdl"

TOOL.Limited			= true
TOOL.LimitName			= "mining_device_limit"
TOOL.Limit				= 30

CAFToolSetup.SetLang("Mining Devices","Create Mining Devices attached to any surface.","Left-Click: Spawn a Mining Device.")

if (CLIENT and GetConVarNumber("CAF_UseTab") == 1) then TOOL.Tab = "Custom Addon Framework" end

function TOOL.EnableFunc()
	if not CAF then
		return false;
	end
	if not CAF.GetAddon("Resource Distribution") or not CAF.GetAddon("Resource Distribution").GetStatus() then
		return false;
	end
	return true;
end

TOOL.ExtraCCVars = {
}

function TOOL.ExtraCCVarsCP( tool, panel )
end

function TOOL:GetExtraCCVars()
	local Extra_Data = {}
	return Extra_Data
end

local function asteroid_scanner_func(ent,type,sub_type,devinfo,Extra_Data,ent_extras) 
	CAF.GetAddon("Resource Distribution").RegisterNonStorageDevice(ent) 
end

local function onboard_ls_refinery_func(ent,type,sub_type,devinfo,Extra_Data,ent_extras) 
	CAF.GetAddon("Resource Distribution").RegisterNonStorageDevice(ent) 
end

local function por_func(ent,type,sub_type,devinfo,Extra_Data,ent_extras) 
	CAF.GetAddon("Resource Distribution").RegisterNonStorageDevice(ent) 
end

local function ship_fuel_refinery_func(ent,type,sub_type,devinfo,Extra_Data,ent_extras) 
	CAF.GetAddon("Resource Distribution").RegisterNonStorageDevice(ent) 
end

local function gyropod_func(ent,type,sub_type,devinfo,Extra_Data,ent_extras) 
	CAF.GetAddon("Resource Distribution").RegisterNonStorageDevice(ent) 
end


TOOL.Devices = {
	asteroid_scanner = {
		Name	= "Asteroid Scanner",
		type	= "asteroid_scanner",
		class	= "asteroid_scanner",
		func	= asteroid_scanner_func,
		devices = {
			scanner = {
				Name	= "Asteroid Scanner ",
				model	= "models/cerus/modbridge/misc/accessories/acc_radar1.mdl"
			}
		}
	},
	
	ls_refinery = {
		Name	= "Onboard LS Refinery",
		type	= "ls_refinery",
		class	= "ls_refinery",
		func	= onboard_ls_refinery_func,
		devices = {
			basic_refinery = {
				Name	= "Onboard LS Refinery ",
				model	= "models/punisher239/punisher239_reactor_small.mdl",
				skin 	= 0
			}
		}
	},
	
	ship_fuel_refinery = {
		Name	= "Ship Fuel Refinery",
		type	= "ship_fuel_refinery",
		class	= "ship_fuel_refinery",
		func	= ship_fuel_refinery_func,
		devices = {
			basic_fuel_refinery = {
				Name	= "Ship Fuel Refinery ",
				model	= "models/Punisher239/punisher239_reactor_big.mdl",
				skin 	= 0
			}
		}
	},
	
	/*
	gyropod_advanced = {
		Name	= "Advanced Gyropod",
		type	= "gyropod_advanced",
		class	= "gyropod_advanced",
		func	= gyropod_func,
		devices = {
			fuel_gyro = {
				Name	= "Advanced Gyropod ",
				--model	= "",
				--skin 	= 0
			}
		}
	},
	
	personal_ore_receiver = {
		Name	= "Personal Ore Receiver",
		type	= "personal_ore_receiver",
		class	= "personal_ore_receiver",
		func	= por_func,
		devices = {
			receiver = {
				Name	= "Personal Ore Receiver ",
				model	= "models/Slyfo_2/acc_sci_coolerator.mdl"
			}
		}
	} */
}